@(label: gitbucket.core.model.Label,
  counts: Map[String, Int],
  repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
  hasWritePermission: Boolean)(implicit context: gitbucket.core.controller.Context)
@import gitbucket.core.view.helpers
<tr id="label-row-@label.labelId">
  <td style="padding-top: 15px; padding-bottom: 15px;">
    <div class="milestone row" id="label-@label.labelId">
      <div class="col-md-8">
        <div>
          <a href="@helpers.url(repository)/issues?labels=@helpers.urlEncode(label.labelName)" id="label-row-content-@label.labelId">
            <span style="background-color: #@label.color; color: #@label.fontColor; padding: 8px; border-radius: 4px;">
              <i class="octicon octicon-tag" style="color: #@label.fontColor;"></i>
              @label.labelName
            </span>
          </a>
        </div>
      </div>
      <div class="@if(hasWritePermission){col-md-2} else {col-md-4}">
        <div class="pull-right">
          <span class="muted">@counts.get(label.labelName).getOrElse(0) open issues</span>
        </div>
      </div>
      @if(hasWritePermission){
        <div class="col-md-2">
          <div class="pull-right">
            <a href="javascript:void(0);" onclick="editLabel(@label.labelId)">Edit</a>
            &nbsp;&nbsp;
            <a href="javascript:void(0);" onclick="deleteLabel(@label.labelId)">Delete</a>
          </div>
        </div>
      }
    </div>
  </td>
</tr>
